home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 223 / 223.d81 / t.tile stylist < prev    next >
Text File  |  2022-08-26  |  5KB  |  188 lines

  1. u
  2.        T I L E    S T Y L I S T
  3.  
  4.             by Brian Boese
  5.  
  6.     Let me begin with a confession.
  7. I've been using a Macintosh lately.
  8. Yes, I know it's wrong, but life is
  9. not always fair. I have to. It's my
  10. job.
  11.  
  12.     Forgive me for saying this, but
  13. there are a few features of the Mac
  14. that I really like, one of which is
  15. its snazzy window screens with catchy
  16. backgrounds. Why can't the same thing
  17. be done on a C-64, without going into
  18. those strange screen modes that Dave
  19. Johannsen uses in QUADRILATION and
  20. TRIANGULATION?
  21.  
  22.     Well, it CAN be done.
  23.  
  24.     My technique is so simple it's a
  25. wonder that it hasn't been used
  26. before. I mean, it is really obvious,
  27. once you've seen it working before
  28. your eyes.
  29.  
  30.     All I did was make a font and
  31. edited the space character. That's it.
  32. Now, wherever I want the pattern (or
  33. tile) to appear, I put a space. To
  34. tile the entire screen with the
  35. pattern, I set the print colour to
  36. what I want and clear the screen. When
  37. a screen is cleared, it's actually
  38. filled with a bunch of spaces. In
  39. order to get a normal, blank-looking
  40. space on the screen I used a
  41. SHIFT-SPACE.
  42.  
  43.     That's it!
  44.  
  45. [DAVE'S NOTE:] And I thought Fender
  46. and Jeff stayed up late into the early
  47. morning manipulating screen pixels
  48. with arcane and eldrich spells and
  49. amulets. Silly me!
  50.  
  51.  
  52.     To show off my artistic talent, I
  53. edited all of the reverse characters
  54. of a font to be decent-looking tile
  55. patterns. The Run It program on the
  56. disk is a simple demo to show you how
  57. attractive these tiles can be when you
  58. put a lot of them together as a
  59. background.
  60.  
  61.     You can use this same technique to
  62. make your window programs look more
  63. professional. Use some of my patterns,
  64. or make some of your own. I recommend
  65. you only use a few in any one program,
  66. as overdoing it can spoil the effect.
  67. (And ruin reader's eye sight. -Ed.) If
  68. you want, you can let the user of your
  69. programs select a pre-made pattern
  70. that you already have set up.
  71.  
  72.     Try it, programmers!  It's easy.
  73.  
  74. BB
  75.  
  76. [FENDER'S COMMENTS:] Brian is right
  77. about tiling being easy, especially
  78. when you use the SPACE character as
  79. your tile. However, I can imagine that
  80. it might get a little old having to
  81. remember to use a SHIFT-SPACE every
  82. time you wanted a regular space. In
  83. this case, why not define some un-used
  84. character (like the \) as the tile and
  85. then define a string as
  86.  
  87. Q$="\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  88.       \\\\\\\"
  89.  
  90.  and instead of clearing the screen,
  91. just do something like
  92.  
  93. PRINT"[CLR]";:FORI=0TO23:PRINTQ$:NEXT
  94.  
  95. It's not too slow, and if you do as I
  96. do, namely never print in the far
  97. right column on the screen, you don't
  98. have line link or scrolling problems.
  99. Notice that Q$ is only 39 characters
  100. long, not 40.
  101.  
  102. When the word got around a few years
  103. back that I was a font-maniac, many
  104. programs came in with oddball alphabet
  105. fonts -- gothic, sanskrit, jagged
  106. computer, double-serifed, you name it.
  107. It took me a while to explain that the
  108. alphabet and numbers shouldn't be
  109. changed radically, it's the GRAPHIC
  110. characters that can and should be
  111. changed for special effects. Such as
  112. making your $129 C-64 look like a
  113. $4000 Mac.
  114.  
  115. There is another interesting line in
  116. Brian's code. Line 30 has these
  117. mysterious POKEs:
  118.  
  119. (1) POKE56576,4
  120. (2) POKE53272,2
  121. (3) POKE648,192
  122. (4) POKE53265,27
  123.  
  124. (1) tells the VIC-II chip to change to
  125.     BANK 3 (instead of the default
  126.     BANK 0).
  127.  
  128. (2) tells the VIC-II chip that the
  129.     font is at the second 1K offset
  130.     from the start of BANK 3, or
  131.     $C800.
  132.  
  133. (3) tells the operating system that
  134.     the screen memory is in BANK 3, at
  135.     page 192, or memory location
  136.     $C000.
  137.  
  138. (4) turns the screen display on.
  139.  
  140. This is a pretty elegant way to use a
  141. custom font without having to take
  142. memory away from BASIC. Usually, if
  143. my program is small (under 30 blocks
  144. or so) I lower the top of BASIC to
  145. page 56 and put the font at the top
  146. of BANK 0 (at $3800). If my program
  147. is too large for this then I raise
  148. the start of BASIC (in a boot
  149. program) to page 16 ($1000) and load
  150. the font into place at page 8
  151. ($0800).
  152.  
  153. With these simple POKEs, Brian has
  154. placed everything up in BANK 3 and
  155. left BASIC unchanged.  You can tell
  156. when something like this has been
  157. done. When you press RUN/STOP-RESTORE
  158. to break out of the program to LIST
  159. it, you find a blue screen with no
  160. cursor. Whaaaat? The thing to do is
  161. to type blindly
  162.  
  163. POKE648,4    [RETURN]
  164.  
  165. and the cursor will appear.
  166.  
  167. And finally, I'm amazed at the
  168. variety of patterns that can be made
  169. with this technique of redefining ONE
  170. character. I wonder what M. C.
  171. Escher would have thought.
  172.  
  173. FT
  174.  
  175. P.S. Frank Vanaman, beta-tester
  176. extraordinaire and our man in DC, has
  177. a good suggestion.  Run FULLFONT
  178. (from LOADSTAR #69) and load "tile
  179. font" from this program. Then choose
  180. FULLFONT's ITALICS feature and you'll
  181. have a completely new set of 128
  182. patterns, some of them very unusual.
  183. As Frank says, "Double value for the
  184. same price." That's the LOADSTAR
  185. way.
  186.  
  187.  
  188.  
  189.